﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class ucHeaderMenu2 : System.Web.UI.UserControl
{
    public SitePage sp = new SitePage();

    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    public string GetCSSClass(params string[] lstUrl)
    {
        string result = string.Empty;

        try
        {
            SitePage basePage = (SitePage)this.Page;
            string s = Request.RawUrl;        
            foreach(string url in lstUrl)
            {
                if (s == "/" && s == url)
                {
                    result += " headerActive";
                }
                else if (url != "/" && s.ToLower().Contains(url))
                {
                    result += " headerActive";
                    break;
                }
            }
        }
        catch
        {

        }
        

        return result;
    }
}

